<!--
 * @FileDescription: 左侧导航栏父模块
 * @Author: 汤子豪
 * @Date: 2021.6.24
 * @LastEditors: 汤子豪
 * @LastEditTime: 2021.6.25
 -->
<template>
  <el-aside width="200px">
    <el-menu
      :default-active="$route.path"
      exact
      class="el-menu-vertical-demo"
      background-color="#545c64"
      text-color="#fff"
      active-text-color="#ffd04b"
      :unique-opened="true"
      router
    >
    <img src="../../assets/img/logo.png" alt="">
      <AsideItem v-for="v in $store.state.asideList" :key="v.navPath" :item="v"></AsideItem>
    </el-menu>
  </el-aside>
</template>

<script>
import AsideItem from "./AsideItem";
import { mapState } from "vuex";
export default {
  name: "Aside",
  components: { AsideItem },
  data() {
    return {
      menuList: [],
    };
  },
  created() {
    //生命周期，完成挂载
    // this.getList();
  },
  methods: {
    // getList() {
    //   this.menuList = this.$store.state.asideList;
    // },
  },
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
img{
  padding-top: 10px;
  width: 190px;
}
</style>
